home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / util / sys / AbortPkt.lzh / AbortPkt / abortpktpatch.c < prev    next >
C/C++ Source or Header  |  1996-11-07  |  664b  |  35 lines

  1. /*
  2.     Patch AbortPkt () to send an ACTION_ABORT packet
  3.     (instead of doing nothing)
  4. */
  5.  
  6. #include <dos/dos.h>
  7. #include <proto/exec.h>
  8. #include <proto/dos.h>
  9.  
  10. #include "jumptable.h"
  11.  
  12. char *hi_msg = "AbortPktPatch 0.1\n";
  13. char *bye_msg = "Done\n";
  14.  
  15. int
  16. main ()
  17. {
  18.   char *errstr;
  19.  
  20.   if (DOSBase = (struct DosLibrary *) OpenLibrary ("dos.library", 37))
  21.   {
  22.     Write (Output(), hi_msg, strlen (hi_msg));
  23.  
  24.     if (errstr = InstallWedge ())
  25.       Write (Output(), errstr, strlen (errstr));
  26.     else
  27.     {
  28.       Wait (SIGBREAKF_CTRL_C);
  29.       Write (Output(), bye_msg, strlen (bye_msg));
  30.       RemoveWedge ();
  31.     }
  32.     CloseLibrary ((struct Library *) DOSBase);
  33.   }
  34. }
  35.